<?php
		$action=$_GET["action"];
		$email=$_SESSION["email"];
		if($action=="update"){
			
			$hoten=$_POST["txthoten"];
			$dienthoai=$_POST["txtdienthoai"];
			$cmnd=$_POST["txtcmnd"];
			$diachi=$_POST["txtdiachi"];
			$ngaydk=$_POST["txtngaydk"];
			
			$sql=mysql_query("update customer set tenkh='$hoten',cmnd='$cmnd',tel='$dienthoai',diachi='$diachi',ngaydk='$ngaydk' where email='$email'");
			echo "<script language=\"javascript1.2\"> location.href=\"index.php?page=profile\"</script>";
		}elseif(action=="edit"){
			$sql=mysql_query("select email,tenkh,cmnd,diachi,tel,ngaydk from customer where email='$email'");
			$row=mysql_fetch_row($sql);
			include("view/profile.php");
		}else{
			$sql=mysql_query("select email,tenkh,cmnd,diachi,tel,ngaydk from customer where email='$email'");
			$row=mysql_fetch_row($sql);
			include("view/profile.php");
		}
?>